/*
 *  @ProductName@
 *  Copyright (C) @CopyrightYear@
 *    National Institute of Advanced Industrial Science and Technology (AIST)
 *    Registration Number: @AISTRegistrationNumber@
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package jp.go.aist.six.vuln.model.scap.nvd;

import jp.go.aist.six.util.orm.AbstractPersistable;
import jp.go.aist.six.vuln.model.scap.vulnerability.Vulnerability;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;




/**
 * The root element of the NVD CVE feed.
 * Multiple "entry" child elements describe specific NVD CVE entries.
 *
 * @author	Akihito Nakamura, AIST
 * @version $Id: Nvd.java 137 2010-05-21 00:30:47Z nakamura5akihito $
 */
public class Nvd
    extends AbstractPersistable
{

    /**
     * CVE entries.
     */
    private Collection<Vulnerability>  _entry = new ArrayList<Vulnerability>();
    //{0..*}


    /**
     * The schema version number supported by the feed.
     */
    private BigDecimal  _nvdXmlVersion;
    //{xsd:decimal, required}


    /**
     * The date the feed was generated.
     */
    private Date  _pubDate;
    //{xsd:dateTime, required}



    /**
     * Constructor.
     */
    public Nvd()
    {
    }



    /**
     */
    public Collection<Vulnerability> getEntry()
    {
        return _entry;
    }


    /**
     */
    public void setEntry(
                    final Collection<Vulnerability> entry
                    )
    {
        if (entry != _entry) {
            _entry.clear();
            if (entry != null) {
                _entry.addAll( entry );
            }
        }
    }



    /**
     */
    public void setNvdXmlVersion(
                    final BigDecimal nvdXmlVersion
                    )
    {
        _nvdXmlVersion = nvdXmlVersion;
    }


    /**
     */
    public BigDecimal getNvdXmlVersion()
    {
        return _nvdXmlVersion;
    }



    /**
     */
    public void setPubDate(
                    final Date pubDate
                    )
    {
        _pubDate = pubDate;
    }


    /**
     */
    public Date getPubDate()
    {
        return _pubDate;
    }

}
// Nvd
